class EventAccessManager():
    '''
    classdocs
    '''
    def __init__(self):
        pass
    
    def get_unit(self):
        return self.unit
    
    def get_name(self):
        return self.name
    
    def numberOfStoredEvents(self):
        return len(self.event_List)
    
    def numberOfReceivedEvents(self):
        return self.numberOfAllEvents
    
    def get_subjects(self):
        aux=list(self.subjects)
        self.subjects.clear()
        return aux

    def getEvents(self):
        if len(self.event_List)>0:
            return self.getComplexEventFunction(self.event_List)
        else:
            return []
    
    def cleanUpStoredEvent(self):
        self.event_List=[]
        self.numberOfAllEvents=0
        
    def min_max_filter(self, complex_event, key, min, max):
        if complex_event.has_key(key):
            value=complex_event[key]
            if (value[0]>=min and value[0]<=max):
                return True
            else:
                return False
            
    def smaller_than(self, complex_event, key, limit):
        if complex_event.has_key(key):
            value=complex_event[key]
            if value<limit:
                return True
            else:
                return False     